package com.cd.service.product;

import java.util.List;

import com.cd.bean.Product;

/**
 * 产品展示接口
 * @author zhk
 *
 */
public interface ProductService {

	/**
	 * 新增
	 * @param product
	 * @throws Exception
	 */
	public void save(Product product) throws Exception;
	/**
	 * 通过id删除
	 * @param id
	 * @throws Exception
	 */
	public void delete(Integer id) throws Exception;
	/**
	 * 更新
	 * @param msg
	 * @throws Exception
	 */
	public void edit(Product product) throws Exception;
	/**
	 * 查询列表（全部）
	 * @return list
	 * @throws Exception
	 */
	public List<Product> listAll() throws Exception;
	/**
	 * 通过id获取
	 * @param id
	 * @return product
	 * @throws Exception
	 */
	public Product findById(Integer id) throws Exception;
	/**
	 * 批量删除
	 * @param id
	 * @throws Exception
	 */
	public void deleteAll() throws Exception;
	/**
	 * 返回记录总数
	 * @return int
	 * @throws Exception
	 */
	public Integer size() throws Exception;
	/**
	 * 返回有限集合（6）
	 * @return
	 * @throws Exception
	 */
	public List<Product> listLimit() throws Exception;
}
